Skip to content

Add models and complete forecasting service#2

Merged
InduwaraRathnayake merged 1 commit into
mainfrom
in-05-03/1
May 3, 2025
Merged

Add models and complete forecasting service#2
InduwaraRathnayake merged 1 commit into
mainfrom
in-05-03/1

Conversation

@InduwaraRathnayake

Copy link
Copy Markdown
Contributor

This pull request introduces significant updates to the forecasting system, including enhancements to the feature pipeline, the forecasting logic, and the API endpoints. The changes improve the system's functionality, scalability, and accuracy. Below is a summary of the most important changes, grouped by theme:

Forecasting Logic Enhancements

  • Refactored forecast_for_product in forecast_runner.py to support SKU-based forecasting, include error handling for missing models, and calculate average, maximum, and minimum forecasts with confidence intervals. It now also supports a configurable number of forecast days.
  • Updated get_current_stock in utils/warehouse_api.py to use hardcoded stock values for different SKUs instead of relying on an external API, improving reliability for testing.

Feature Pipeline Improvements

  • Added prepare_features in pipeline.py to enrich the feature set with seasonal and weekend indicators, improving forecast accuracy. Seasonal data is one-hot encoded for better model input.

API and Routing Updates

  • Added a new forecast_view endpoint in views.py to handle POST requests for forecasting, accepting product_SKU and days as inputs.
  • Updated urls.py to include the new /forecast/ endpoint.

Documentation Updates

  • Updated README.md to reflect the switch from product_name to product_SKU in API requests and responses, and removed outdated linting and best practices section. [1] [2] [3]

@InduwaraRathnayake InduwaraRathnayake merged commit 4272fce into main May 3, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant